package com.bwie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bwie.pojo.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    @Select("SELECT g.*,b.brand_name FROM goods as g LEFT JOIN brand as b on g.brand_id = b.id")
    Page<Goods> pageList(Page<Goods> goodsPage);
}
